<html>
<head>
<title>查询本地库</title>
<link rel="stylesheet" href="/css/def.css">
<link rel="stylesheet" href="/css/tab.css">
<script src="/js/h.js"></script>
<script src="/js/p.js"></script>
</head>

<body class="MyBody">

<div style="overflow: auto; text-align: left; height: 35px; background-color: #C1FFE4;"></div>

<div id="divResultMsg" style="text-align: left; background-color: #C1FFE4;">
<table id="tabResultMsg" style="border: solid 0px #C1FFE4; text-align:left;color: #3E6373; display:none;">
<tr>
<td style="padding: 5px 0px 0px 10px;vertical-align: top;"></td>
<td style="padding-top:5px"><pre id="spanResultMsg" style=" font-size: 12px;"></pre></td>
</tr></table>
</div>

<div>本地db文件：<input type="text" name="dbfile" id="dbfile" placeholder="" size="60" value="" /></div>
<div>sql：</div>
<div><textarea id="sqltext" rows="8" cols="120">
select type,name,tbl_name,rootpage from sqlite_master where type='table';
PRAGMA table_info(RECEIPTDATA0);
</textarea></div>

<div><input type="button" name=deleteData value="执行" onclick="doExec()" /></div>

<div id="jsonMsg"></div>

<div id="data1"></div>
<div id="divHintMsg" style="position:absolute; top:0px; right:30px; z-index: 9901;background:#DDDDDD;filter:alpha(opacity=90);opacity:0.9; border: solid 1px #BCBCBC; display: none;"></div>

<script type="text/javascript">

var yearMo = new Date().format("yyyyMM");
document.getElementById("dbfile").value = "{$DSPHOME}\\db\\bizport"+yearMo+".db";

function doExec(){
	var sql = selectText();
	if(sql == null || sql == ""){
		sql = document.getElementById("sqltext").value;
	}
	var pData = "{\"dbfile\":\""+encodeURI(document.getElementById("dbfile").value)+"\",\"sqltext\":\""+encodeURI(sql)+"\"}";
	postHttp("/m/qry", pData, showList, "data1");
	outputResultMsg("已提交");
}

</script>
</body></html>

